Uptime is a measure of the time a machine has been up without any downtime.
It is often used as a measure of computer operating system reliability or stability, in that this time represents the time a computer can be left unattended without crashing, or needing to be rebooted for administrative or maintenance purposes. Conversely, long uptime may indicate negligence, because some critical updates can require reboots on some platforms.[1]
Contents |
In 2005, Novell reported a server with a 6 year uptime.[2][3]
Netcraft maintains the uptime records for many thousands of web hosting computers.[4]
Users of Windows XP Professional, Windows Server 2003 and Windows Vista systems can type systeminfo
at the Command Prompt to display all system information, including the System Up Time.[5]
C:\> systeminfo | find "Time:" System Up Time: 0 Days, 8 Hours, 7 Minutes, 19 Seconds
Note: Windows Vista Business 64-bit and Windows 7 do not return a "System Up Time" but "System Boot Time" instead.
This method functions properly in versions of Windows released prior to Windows Server 2008 R2 or Windows 7. While the command does run in any current version of Windows, the results are unreliable.[6] You may, sometimes, replicate this by running the command on a computer followed by using either the WMI query or uptime commands listed here or you can open the task manager and, under the 'Performance' tab, read the uptime value. Note that the reference article only refers to Windows Server 2008 R2, however the issue does exist, intermittently, in other operating systems of the same generation. You may refer to this screenshot for a example of the discrepancy.
C:\> net statistics server | find "since" Server Statistics for \\COMPUTERNAME Statistics since 8/31/2009 8:52:29 PM
C:\> net statistics workstation | find "since" Server Statistics for \\COMPUTERNAME Statistics since 8/31/2009 8:52:29 PM
The line that start with "Statistics since ..." provides the time that the server was up from. The command "net stats srv" is shorthand for "net statistics server."[7]
Microsoft has also provided a downloadable Uptime.exe utility:
C:\> Uptime SYSTEMNAME has been up for: 2 day(s), 4 hour(s), 24 minute(s), 47 second(s)
Uptime can also be determined via Windows Management Instrumentation from the command-line with WMIC:
C:\> wmic os get lastbootuptime LastBootUpTime 20110508161751.822066+060
The timestamp is in the format yyyymmddhhmmss.nnn, so this is a computer that last booted up on 8 May 2011 at 16:17:51.822. WMI can also be used to find the boot time of remote computers as well (Windows permissions allowing), for example with WMIC:
C:\> wmic /node:"my-server" os get lastbootuptime LastBootUpTime 20101219141712.462006+060
WMI can also be used via a programming language such as VBScript or Powershell[8][9]
Users of Windows Vista and Windows 7 can see uptime in Windows Task Manager under the tab Performance.
Users of Linux systems can use the uptime utility ( – Linux User Commands Manual) to get the uptime, together with the current time, the number of users and load averages for the past 1, 5 and 15 minute intervals:
$ uptime 18:17:07 up 68 days, 3:57, 6 users, load average: 0.16, 0.07, 0.06
Shows how long the system has been on since it was last restarted:
$ cat /proc/uptime 350735.47 234388.90
The first number is the total number of seconds the system has been up. The second number is how much of that time the machine has spent idle, in seconds.[10] On multi core systems (and some linux versions) the second number is the sum of the idle time accumulated by each CPU.[11]
Like Linux, BSD based operating systems such as FreeBSD and Mac OS X also have the uptime command (See – FreeBSD General Commands Manual).
There is also a method of using sysctl to call the system's last boot time[12]:
$ sysctl kern.boottime kern.boottime: { sec = 1271934886, usec = 667779 } Thu Apr 22 12:14:46 2010
Users of OpenVMS systems can type show system at the command prompt.[13]
$ show system/noprocess OpenVMS V7.3-2 on node JACK 29-JAN-2008 16:32:04.67 Uptime 894 22:28:52
This shows the uptime as days then hours:minutes:seconds.
There are a many external services which can be used to monitor the uptime and downtime as well as availability of a service or a host. Some examples:
|